with Ada.Assertions; use Ada.Assertions;

separate(Test_Websites)

--
-- Test percentage bound string space used
--

procedure Test_Percentage_Space_Used
is
   --
   -- constants
   --

   BOUND_STRING_SIZE : constant := 300;

   STRING_TEST_VALUE : constant String := "The phrase was proposed as a typing"
     & " drill by a teacher named Charles E. Weller.";

   CORRECT_PERCENTAGE : constant := 26;

   --
   -- object instance under test
   --

   package Web_Pkg is new Websites( Content_Size_Max => BOUND_STRING_SIZE );

   package Web_Proto_Pkg is new Websites_Prototypes( Web_Pkg );

   Web_Instance : Web_Proto_Pkg.Website_Object_Interface;


begin

   --
   -- test assertions
   --

   Web_Instance.Set_Contents( STRING_TEST_VALUE );

   Assert ( Web_Instance.Percentage_Space_Used = CORRECT_PERCENTAGE,
            "Percentage String space used varies from expected"  );


end Test_Percentage_Space_Used;
